package com.ruoyi.etp.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 员工设备使用情况对象 etp_recording_device_stats
 *
 * @author xmj
 * @date 2025-09-09
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EtpRecordingDeviceStats extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 员工id */
    @Excel(name = "员工id")
    private Long userId;
    /** 所属组织 */
    @Excel(name = "所属组织")
    private String deptId;
    /** 录音次数 */
    @Excel(name = "录音次数")
    private Long recordingCount;
    /** 已上传录音数量 */
    @Excel(name = "已上传录音数量")
    private Long uploadedRecordings;
    /** 未上传录音数量 */
    @Excel(name = "未上传录音数量")
    private Long notUploadedRecordings;
    /** 设备在线天数 */
    @Excel(name = "设备在线天数")
    private Long onlineDays;
    /** 录音时长(小时) */
    @Excel(name = "录音时长(小时)")
    private BigDecimal recordingDurationHours;
    /** 首次开机时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "首次开机时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date firstBootTime;
    /** 最低出工电量(%) */
    @Excel(name = "最低出工电量(%)")
    private Long minWorkBatteryPercent;
    /** 平均出工电量(%) */
    @Excel(name = "平均出工电量(%)")
    private Long avgWorkBatteryPercent;
    /** 当前设备版本号 */
    @Excel(name = "当前设备版本号")
    private String currentDeviceVersion;
    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("deptId", getDeptId())
            .append("recordingCount", getRecordingCount())
            .append("uploadedRecordings", getUploadedRecordings())
            .append("notUploadedRecordings", getNotUploadedRecordings())
            .append("onlineDays", getOnlineDays())
            .append("recordingDurationHours", getRecordingDurationHours())
            .append("firstBootTime", getFirstBootTime())
            .append("minWorkBatteryPercent", getMinWorkBatteryPercent())
            .append("avgWorkBatteryPercent", getAvgWorkBatteryPercent())
            .append("currentDeviceVersion", getCurrentDeviceVersion())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
        .toString();
    }
}
